'use strict';

module.exports = app => {
  const { INTEGER, DATE, STRING } = app.Sequelize;

  const QuesttionAnswer = app.model.define('questtion_answer', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    question: STRING(100),
    answer: STRING(100),
    create_time: DATE,
    update_time: DATE,
    delete_time: DATE,
  }, {
    defaultScope: {
      attributes: {
        exclude: [ 'delete_time', 'update_time' ],
      },
    },
  });
  return QuesttionAnswer;
};
